package com.didispace.domain;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.data.mongodb.repository.Query;

/**
 * @author 程序猿DD
 * @version 1.0.0
 * @date 16/4/27 下午10:16.
 * @blog http://blog.didispace.com
 */
public interface PersonRepository extends MongoRepository<Person, Long> {

    Person findByName(String name);
  //  @Query(value="{'name':?0}",fields="{'name':1}")
  // @Query(value="{'name':?0}")
  //@Query(fields="{'name':1}")
    public Page<Person> findByNameLike(String name, Pageable pageable);
}
